/*
* Copyright (C) 2020 ~ 2024 chaigec All Rights Reserved.
*
* Author:     chaigec <chaigec@163.com>
* Maintainer: chaigec <chaigec@163.com>

 * Use of this source code is governed by MIT license that can be found in the
 * LICENSE file in the root of the source tree. All contributing project authors
 * may be found in the AUTHORS file in the root of the source tree.
*/

#ifndef MK_SIP_DIALOG_H
#define MK_SIP_DIALOG_H
#include "MkSipMessage.h"
#include "MkUtil/MkTime.h"

class MkApi CMkSipDialog
{
public:
    typedef enum _sip_call_type
    {
        MkSipDialogCaller,
        MkSipDialogCallee
    }MkSipCallType;

    typedef enum _sip_dialog_type
    {
        MkSipDialogInvite,
        MkSipDialogSubscribe,
        MkSipDialogRegister
    }MkSipDialogType;
public:
    CMkSipDialog();
    ~CMkSipDialog();

    void SetDialogType(const MkSipDialogType& DialogType) { m_DialogType = DialogType; }
    void SetCallType(const MkSipCallType& CallType) { m_CallType = CallType; }
    void SetRequest(const CMkSipMessage& SipRequest);
    void SetResponse(const CMkSipMessage& SipResponse);
    void SetAck(const CMkSipMessage& SipAck) { m_Ack = SipAck; }

    const CMkSipMessage& GetRequest() const { return m_Request; }
    const CMkSipMessage& GetResponse() const { return m_Response; }
    const CMkSipMessage& GetAck() const { return m_Ack; }
    const MkSipDialogType& GetDialogType() const { return m_DialogType; }
    const MkSipCallType& GetCallType()  const { return m_CallType; }
    const MkString& GetContactHost() const { return m_ContactHost; }
    const Uint16& GetContactPort() const { return m_ContactPort; }
protected:
private:
    MkSipDialogType         m_DialogType;
    MkSipCallType           m_CallType;

    CMkSipMessage           m_Request;
    CMkSipMessage           m_Response;
    CMkSipMessage           m_Ack;
    MkString                m_ContactHost;
    Uint16                  m_ContactPort;
};


#endif
